<?php

namespace app\common\customer\model;


use app\common\config\logic\DictionaryLogic;
use app\common\config\model\ConfigSource;
use app\common\system\logic\UserLogic;
use think\Model;
use think\model\concern\SoftDelete;

class CustomerSource extends Model
{
    protected $table = "tk_member_source";

    use SoftDelete;
    protected $defaultSoftDelete = 0;

    protected $type = [
    ];

    public function getSourceAttr($value, $data) {
        $logic = new DictionaryLogic();
        return $logic->getFullPath($data['source_id']);
    }

    public function getCreatorAttr($value, $data)
    {
        $userLogic = new UserLogic();
        return $userLogic->getUser($data['create_id']);
    }
}